// 给服务器上传一个大文件，服务器将文件保存下来，测试结果

#include "httpserver.hpp"

int main()
{
    Socket client_sock;
    client_sock.CreateClient(8202, "127.0.0.1");
    std::string req = "PUT /1234.txt HTTP/1.1\r\nConnection: keep-alive\r\nContent-Length: 0\r\n\r\n";
    std::string body;
    Util::ReadFile("./hello.txt", &body);
    req += "Content-Length: " + std::to_string(body.size()) + "\r\n\r\n";

    
    assert(client_sock.Send(&req[0], req.size()) != -1);
    char buf[1024] = {0};
    assert(client_sock.Recv(buf, 1023));
    DEBUG_LOG("[%s]", buf);

    
    client_sock.Close();
    return 0;
}